/* const defaultState = {
  num: "num",
};

export default (state = defaultState) => {
  return state;
};
 */

const defaultState = {
  num: 1,
};
const exState = (state = defaultState, action) => {
  let newState = JSON.parse(JSON.stringify(state));
  /* if (action.type === "addNum") {
    newState.num++;
    console.log(newState);
  } */
  switch (action.type) {
    case "addNum":
      newState.num += action.value;
      break;
    default:
      break;
  }
  return newState;
};
//esliint-disable-next-line
export default exState;
